<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/11/29
 * Time: 10:51
 */
session_start();
if(isset($_session['userinfo'])){
    $login = true;
    $userinfo = $_SESSION['userinfo'];
}else{
    $login = false;
}
if(isset($_GET['action']) && $_GET['action']=='logout'){
    unset($_SESSION['userinfo']);
    if(empty($_SESSION))  session_destroy();
    header('Location:login.php');
    die;
}
require 'user_html.php';